package com.ruoyi.cfuser.cfuser.service.impl;

import java.util.List;

import com.ruoyi.cfuser.api.domain.CfUser;
import org.springframework.stereotype.Service;
import com.ruoyi.cfuser.cfuser.mapper.CfUserMapper;

import com.ruoyi.cfuser.cfuser.service.ICfUserService;

import javax.annotation.Resource;

/**
 * 用户Service业务层处理
 *
 * @author ruoyi
 * @date 2025-02-22
 */
@Service
public class CfUserServiceImpl implements ICfUserService
{
    @Resource
    private CfUserMapper cfUserMapper;

    /**
     * 查询用户
     *
     * @param id 用户主键
     * @return 用户
     */
    @Override
    public CfUser selectCfUserById(Long id)
    {
        return cfUserMapper.selectCfUserById(id);
    }

    /**
     * 查询用户列表
     *
     * @param cfUser 用户
     * @return 用户
     */
    @Override
    public List<CfUser> selectCfUserList(CfUser cfUser)
    {
        return cfUserMapper.selectCfUserList(cfUser);
    }

    /**
     * 新增用户
     *
     * @param cfUser 用户
     * @return 结果
     */
    @Override
    public int insertCfUser(CfUser cfUser)
    {
        return cfUserMapper.insertCfUser(cfUser);
    }

    /**
     * 修改用户
     *
     * @param cfUser 用户
     * @return 结果
     */
    @Override
    public int updateCfUser(CfUser cfUser)
    {
        return cfUserMapper.updateCfUser(cfUser);
    }

    /**
     * 批量删除用户
     *
     * @param ids 需要删除的用户主键
     * @return 结果
     */
    @Override
    public int deleteCfUserByIds(Long[] ids)
    {
        return cfUserMapper.deleteCfUserByIds(ids);
    }

    /**
     * 删除用户信息
     *
     * @param id 用户主键
     * @return 结果
     */
    @Override
    public int deleteCfUserById(Long id)
    {
        return cfUserMapper.deleteCfUserById(id);
    }
}
